package com.fyb.java.ai.langchain4j.assistant;
import dev.langchain4j.service.*;
import dev.langchain4j.service.spring.AiService;
import reactor.core.publisher.Flux;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

@AiService(
        wiringMode = EXPLICIT,
//        chatModel = "qwenChatModel",//通义千问大模型
        streamingChatModel = "qwenStreamingChatModel",//流式输出
        chatMemoryProvider = "chatMemoryProviderXiaozhi",//聊天以及存储
        tools = "appointmentTools",//工具
        contentRetriever = "contentRetrieverXiaozhiPincone"//向量存储
)
public interface XiaoZhiAgent {
    @SystemMessage(fromResource = "zhaozhi-prompt-template.txt")
//    String chat(@MemoryId Long memoryId, @UserMessage String userMessage);
    Flux<String> chat(@MemoryId Long memoryId, @UserMessage String userMessage);//流式输出
}